The online racing simulator
Searching in All forums
(951 results)
Yisc[NL]
S3 licensed
After a lot of testing and with Lapper version 7.0.4.9 having been released last night, it's about time to put the 'Schedule' and 'Set Schedule' modules out of the BETA stage.

Changelog for Schedule V2.01 and V2.02:

-Moved the version out of BETA (V2.01)
-Fixed a bug in Sub 'Set_server_settings' which didn't check if Canreset needed changing when compared to General settings (V2.02)

Changelog for Set Schedule V2.01:

-Fixed a bug where the CFG-button was shown at an inappropriate moment
-Added a message about having deleted a server name when no text is put in, to Sub 'config_server_name'
-Clarified the text about having loaded the schedule of another server in Sub 'activate_server_name'
-Moved the version out of BETA

Change the extension of the files to .lpr and add them to addonsused.lpr to be able to use them.

I am currently writing up a manual about how to use the 'Set Schedule' module, which can be found here: https://www.lfs.net/forum/post/1929939#post1929939
Last edited by Yisc[NL], .
Yisc[NL]
S3 licensed
Quote from zmayco :but I do not know how to start creating an insim

Then grab a program that's already been made and start working with that.
Use LFS Lapper for example, which handles most of the packets for you and 'only' requires you to write forms, store/retrieve values, define actions, etc.
[Manual] schedule_set.lpr
Yisc[NL]
S3 licensed
Script written by: Yisc[NL]
Use script with LFS Lapper version: 7.0.4.9 or above
Most recent script version: 2.01
Most recent version released at: 31-10-2017
Command to start the module: !ss , !set_schedule

=======================

Starting module for the first time and creating general settings:

Module 'schedule_set.lpr' can be used by server owners/league organisers to enter their races into a schedule and then let Lapper take care of the rest.
When the module is started for the first times, a warning is given on both the Lapper console as on screen within LFS, that some basic settings need to be made first.





Along with the warnings, the 'Configure general schedule settings' window will be brought up and will look like this:



We take a closer look at the choices that can be made in this window:

'Allow reset in general' can be set to YES or NO and will decide wether players are allowed to reset their car when the server isn't running in 'event-mode'.

'When to check schedule' can be set to "Every day" or "Every hour" and will tell LFS Lapper when to check the inserted schedule and make any changes if they are required.
In case it's set to "Every day" an extra button will appear with the text 'Set time'.
Once that button is clicked a value can be added to set the hour and minute to do the actual checking.
Those values needs to be seperated by a :, and no leading zeros have be used.
So if you would like to check settings every day at 00:02, you set the value to 0:2 and click the OK button to save the value.



'Change server settings' will decide when LFS Lapper will go into 'event-mode'.
The choices are 'Day of event' or '1 hour before event'
Of course you will need to think about this choice in relation to the choice you made when setting 'When to check schedule'.

'When does event end' will decide when LFS Lapper will go back to 'normal-mode' after and event has taken place.
You can choose to end an event 2 hours after the start, 3 hours after the start, or not to end the event at all.
If you set this value to either 2 or 3 hours, it will mean that regardless the setting you made in the 'When to check schedule' box, no checking of schedule will be done as long as the event is running.

'Set standard race after event' can be set to either YES or NO.
When set to YES, you will get an extra set of options, that will be loaded after the event has ended.
Again, this option will only work if you set to end the event after 2 or 3 hours.

'Timezone 1 + offset to UTC' can be used to specify your local timezone and its offset to UTC.
Since I am based in Europa, I set it to 'CEST' and the offset to +2

'Timezone 2 + offset to UTC' can be used to specify a second local timezone and its offset to UTC.
Since I am based in Europa, I set it to 'CET' and the offset to +1

Once you are done making all these general settings (every setting is stored into the LFS Lapper database immediately), you can click the 'Close general schedule settings' button.



Once you did that, the actual module to enter your races into, will be opened and a message will be shown that Lapper needs a restart to activate the general settings.
To restart Lapper, use command: !reload





=======================

Starting to fill the schedule:

The module can store and handle schedules for a maximum of 8 servers.
You can set the name of a server by clicking at one of the 'Click to set' buttons that are behind 'Server name x', but if you want to use the name of the server you are currently on, you can also click the 'Server name 1' button using your LEFT mouse button, to copy the name of the server you are currently on, to the Server name 1 field.
If you did do the copy action the text 'Server name 1' will turn green, to indicate that the schedule (although no settings have been made yet) have been loaded.
If you set the name of a server, but that one isn't currently loaded, the text 'Server name X' will be in yellow.





There are two ways to delete the name of a server:
  1. Click the name of the server, don't enter any text and press the OK button
  2. Click 'Server name X' using your RIGHT mouse button
In both cases a message is shown, to confirm that you deleted a server name:



It's important to know that deleting a server name, DOESN'T delete the corresponding schedule for that server name.

If multiple server names are set and you want to load the schedule of a diffent server name then the one that's currently loaded (the one with the green text saying 'Server name X'), then click on the server name you want to load, using your LEFT mouse button.
Once you did that, 'Server name X' will be shown with green text and the previous one will get a yellow text.
There's also a message displayed, to indicate that the active server name has been changed and the schedule of that server name has been loaded:



Now that the name(s) of the server(s) is/are set, it's time to add an actual schedule for that server name.
To do so, we will start by setting the first race date by clicking the 'Set' button in the Date column.
That will take you to an input field, which also tells you in which format the date needs to be added:



As soon as the date has been entered and is accepted by the module (every field has data validation, to prevent people entering data in the wrong format or illegal values in the wrong places (like text in a number field or vice versa)) a second row will appear and the number of the first row will be displayed with red text, to indicate that vital information is missing at the moment:



Vital information is "date, time, track, car(s), laps" and once those 5 fields are filled, the nummer will be displayed with white text again.

Next step is to set a time when the race will take place.
To do so, we click the 'Click to set' button in row 01 and are then presented with another input field, which again tells us what format is required:



Next up is the track the race will be held on.
We click the 'Set' button in row 01 and are presented with another input field, which tells us that the short trackcode needs to be entered:



Next field is the car (or cars) the race will be held with.
There are two options to set the car(s):
  1. Click the 'Click to set' button and enter the carname(s)
  2. Click the + sign on row 01, which will open the car selection GUI




When you have chosen to type the carname(s), simply type name and use the + sign if you want to set multiple cars.

Example with only using XFG, you just type: XFG
Then press OK to save the value.
Example with using UF1 and XFG, you just type: UF1+XFG
Then press OK to save the value.

When you have chosen to use the car selection GUI, just click the name of the car(s) using your LEFT mouse button (name of the car will change to green, to indicate it has been selected) and once you selected all the cars you want, click the 'Select car(s)' button at the bottom of the car selection GUI.
To de-select a car, just click the name for a second time with your LEFT mouse button and the name will change to white again, to indicate it is no longer selected.

The car selection GUI also shows you some groups of cars (the values displayed in cyan) that can be chosen.
To select a group, click its name using your LEFT mouse button (name will turn green) and de-select it by clicking it again using your LEFT mouse button (name will turn cyan again).
If you want to know which cars belong to that groupname, click the name using your RIGHT mouse button and then information about that group will be displayed as a chatmessage:



The last special function of the car selection GUI is the option of using one or more groups, but to exclude certain cars from it.
Let's say we want to race with group "TBO" but want to exclude the RB4.
First with click 'TBO' using our LEFT mouse button to select the group.
Then we click 'RB4' using our RIGHT mouse button (name will go red) to exclude that car from the selected group:



When excluding a car (or multiple cars) an INFO message is shown, that excluding a car is only working in combination with one or more groups (and of course if that car belongs to the selected group(s)):



The last piece of vital information that needs to be added now, is the number of laps the race will be.
To do so we click the 'Set' button on row 01 and are again presented with an input field:



Valid numbers are: 1 up to and including 100
Above 100 the steps are always in 10 laps, so 110, 120, 130, etc. to a maximum of 1000 laps.

With the last piece of vital information in place, the number of the race will turn white again, to indicate that all needed information has been entered:



[More information will be added soon]
Last edited by Yisc[NL], .
Yisc[NL]
S3 licensed
Here is the next (and as far as I am concerned, last one) BETA for the 'Schedule' module.

Changelog for Schedule V2.00.14 BETA:

-Only go from Sub 'OnNewPlayerJoin_Schedule' to Sub 'Update_password' if $join_track_allowd is 'true'

Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.
Yisc[NL]
S3 licensed
Soccer addon for Lapper (although probably only working with on older version of Lapper) and a layout, can be found here: https://www.lfs.net/forum/thread/87867
Yisc[NL]
S3 licensed
Here is the next BETA for the 'Schedule' module.

Changelog for Schedule V2.00.13 BETA:

-Added extra delay in Sub 'end_of_event' to be able to change track (if needed) at end of event

Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.
Yisc[NL]
S3 licensed
Here is the next BETA for the 'Schedule' module.

Changelog for Schedule V2.00.12 BETA:

-Fixed a bug regarding data storage which failed when no race was found during daily/hourly schedule check
-Added join_track block to daily/hourly schedule check

Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.
Yisc[NL]
S3 licensed
Here are the next BETAS for the 'Schedule' and 'Set Schedule' module.

Changelog for Schedule V2.00.11 BETA:

-Current qualify length is now checked and only changed if needed (needs LFS Lapper 7.0.4.9)
-Current canreset status is now checked and only changed if needed (needs LFS Lapper 7.0.4.9)
-Current cruise status is now checked and only changed if needed (needs LFS Lapper 7.0.4.9)
-Added two Globalvars to be used to write data to a file
-Added a Goto to Sub 'OnNewPlayerJoin_Schedule'
-Added a new Sub 'Update_password' to be able to save data to a file when a player joins the track
-Added an extra delay after ending a race (/end) (which takes at least 3 seconds), before changing track
-Clear the values of GlobalVars $date_storage and $pwd_storage in Sub 'Update_password' after sending data through HTTP

Changelog for Set Schedule V2.00.12 BETA:

-Fixed a bug in Sub 'config_schedule_interval' where $track_check_minutes were calculated wrongly when using H:M

Change the extension of the files to .lpr and add them to addonsused.lpr to be able to use them.
Yisc[NL]
S3 licensed
Quote from Gutholz :I missed the last race, so thanks for the video.

--
Next race, this sunday at CET 19:30 is at Fern Bay Gold (FE3) with the MRT.


It's actualy 19:30 CEST, as summertime will end next weekend Wink
Yisc[NL]
S3 licensed
Quote from TechEdison :Next race today

1:30pm est qual
2:00pm est race

BL2 FBM 75 LAP

Anyone interested? Im rather busy so im leaning towards cancelling...

Might I offer you a piece of unwanted advice?
Create a schedule when your races will be (same day and time every week, for example) and then stick to the plan.
This will help interested people to reserve a spot in their agenda.
Also, when asking for people to join, it won't help saying that you are actualy busy and would rather cancel then go on with it.
I really like your enthousiasm, but it's all a bit hap hazzard the way things are going lately.
Maybe it would be better to join some well organised events your self and learn from them, before trying to run your own league(s).
This shouldn't be an advertisement, but Absolute-Beginners.nl is doing leagues for many years now, with well organised servers and Lapper software (I am running their servers and writing their software as well), with people joining that are beginners as well as very good drivers.
This all makes for a nice field week in week out (every sunday evening), but there are more very well organised leagues to choose from.
Yisc[NL]
S3 licensed
From what I've been reading, LFS External is old and it would be better to start using Insim dotnet.
Yisc[NL]
S3 licensed
Yeah a powerpeak is when the voltage spikes.
I had it once in my life due to a central transformatorhome in our neighbourhood having a huge problem and therefor my pc was fried (among a few other devices in our house).
Since then I have a powerfilter installed, which takes care of these peaks in case they happen.
Maybe the guy pushed your hardware too far, which made it overheat and slowly die (of course I can only guess, only having your report to work with).

Have a go with this for a test: http://www.ozone3d.net/benchmarks/fur/
Yisc[NL]
S3 licensed
Since modern GPU's have a relation with audio as well, I think that you GPU is damaged.
Given the fact that both the HDD as the LCD recently failed, makes me believe that your laptop suffered from a powerpeak, which is really bad for hardware and can cause a lot of damage.
To proof this theory, you could try to start another game that's heavy on the GPU, if that is also showing problems, you will know for sure that your GPU is damaged.
In case that game is working fine, there could be an issue with your GPU driver, so then I would recommend you to download the latest version of it and install that one.
Yisc[NL]
S3 licensed
Insim only is a protocol used by a program like PRISM or Lapper to communicate with LFS.
So to be able to answer your question, we first need to know what program you are using.
Yisc[NL]
S3 licensed
Hello, I copied your code and tried to load it, but it threw several errors in the Lapper logfile.

After making some adjustments, this is working as far as I can tell.
I left my debug code in the script,


<?php 
/*
CatchEvent OnLapperStart()
    OnLapperStart_Ctrack();
EndCatchEvent
*/

CatchEvent OnMSO$userName$text # Player event
     
$idxOfFirtsSpace indexOf$text" ");
    IF( 
$idxOfFirtsSpace == -THEN
      $command 
$text;
      
$argv "";
    ELSE
      
$command subStr$text,0,$idxOfFirtsSpace );
      
$argv trimsubStr$text,$idxOfFirtsSpace ) );
    ENDIF

    SWITCH( 
$command )

        CASE 
"!dist":
            
check_player_distance();
            BREAK;
    ENDSWITCH
EndCatchEvent

Sub check_player_distance
()
    
$players GetListOfPlayers("U");
    
dumpvar($players); #DEBUG
    
    
FOREACH( $var IN $players )
        
$distance trackuserdistanceGetCurrentPlayerVar "UserName" ),$var["value" ] );
        
writeline "DEBUG: "$distance );

        IF ( 
$distance <=)
        
THEN
          globalMsg 
"^6Twin " GetCurrentPlayerVar "NickName" ) . "^6 and " GetPlayerVar $var["value"],"NickName") );
        ELSE
          
privMsg "No nearby Cars" );
        ENDIF
    ENDFOREACH
EndSub
?>


Yisc[NL]
S3 licensed
Although this thread is old and hasn't been updated in years, this still would be the right place to mention a new version of this script.
So here is version 2.13 for the 'Pitboard' module.

Changelog Pitboard V2.13

-Added routine to delete data from 'fi_stored' and store it into 'fi_user_value'
-Removed some debug code
-Removed a section of code that has been disabled for a while

Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.
Yisc[NL]
S3 licensed
I hardly have any knowledge about linux, so I guess you will have to try what you think it should be.
If the path isn't correct, you won't see the messages I put in the 'announcements.txt' file for testing.
Yisc[NL]
S3 licensed
This was a nice exercise to get to grips with one of the new Lapper features (being able to read TXT files).
I think this module has all that you asked for, but of course the final verdict is in your hands.

- Download both files and save them in your 'includes' folder of Lapper
- Rename 'announcement_messages.txt' to 'announcement_messages.lpr'
- Open file 'announcement_messages.lpr' and adjust the path to the TXT file, matching your actual locating of the TXT file *
- Open 'addonsused.lpr' and add the new lpr file to the includes

* The path can be found in Sub 'announce_message()'
In this line: $Folder = "D:\LFSLapper V7.0.4.8\bin\includes";

Yisc[NL]
S3 licensed
Okay, doesn't sound too hard to script.
Will work on it tomorrow.
Yisc[NL]
S3 licensed
Where should these messages be displayed?
Do you want to only read the text from a file, or do you want to feed the file from a GUI in Lapper as well?
Last edited by Yisc[NL], .
Yisc[NL]
S3 licensed
Although this thread is old and hasn't been updated in years, this still would be the right place to mention the a new version of this script.
So here is the BETA for the 'Handicap system' module.

This script can ONLY be used in combination with the 'Set Schedule' module.
Compared to the last version of the 1.x series, the script went from 4113 lines of code to 1440 lines of code, which is a huge improvement.

Handicap system V2.00.1 BETA (compared to version 1.15)

-Fixed a bug about not closing buttons when switching from using no subclasses to using subclasses
-Renamed sub 'config_class_indicator' to 'config_class_indicator_input'
-Merged sub 'config_class_indicator_fws' and 'config_class_indicator_pipe' into one sub 'config_class_indicator'
-A lot of code has been re-written to make it more efficient
-Added a field to show which cars are used in the race with that Race ID
-Added a button and routine to copy handicap settings from another Race ID to the current Race ID
-Added check to make sure a car name is only entered once into the handicap settings of a race
-Added a button to delete all handicap settings for the selected Race ID
-Added a check to prevent people from using a * as class indicator (* is used to seperate data when being stored)

Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.
Last edited by Yisc[NL], .
Yisc[NL]
S3 licensed
Here is the next BETA for the 'Set Schedule' module.

Unless any bugs will come up, this is the final BETA.
The script went from 2566 lines of code (version 1.04) to 2909 lines of code in this BETA.
A lot of the old code has massively been improved, while a lot of features has been added.

The Schedule script went from 1924 lines of code (version 1.06) to 1287 lines of code in the latest BETA (V2.00.7 BETA).
Again a lot of old code has been massively improved.

Changelog for Set Schedule V2.00.11 BETA:

-Fixed a bug where the Default buttons weren't closed when opening General Configuration screen

Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.
Yisc[NL]
S3 licensed
Here is the next BETA for the 'Set Schedule' module.

The 'Server name X' buttons have 3 colors and functions now:

Text in yellow = A name for that server number is set, schedule ISN'T loaded
Text in green = A name for that server number is set, schedule IS loaded
Text in white = No name for that server number is set

Text in yellow , clicked with LEFT mouse button, schedule will be loaded
Text in yellow/green , clicked with RIGHT mouse button, name for that server number will be deleted
Text in white , clicked with the LEFT mouse button, name for that server number will be copied from the current server you're on (if that name isn't already used in one of the other server number names

Changelog for Set Schedule V2.00.10 BETA:

-Rewritten all code for setting default values and option to copy them (to avoid going over 240 buttons limit)
-Fixed a bug where weather code wasn't appearing when trackcode wasn't set, but no warning about it was given
-Removed LOAD/DELETE buttons for servers and included those functions within the 'Server name X' buttons
-Removed C(opy) button for servers and included that function within the 'Server name X' buttons

Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.
Yisc[NL]
S3 licensed
Quote from TechEdison :If you're alright with my asking, how have you been sick in bed for 7 months?!? That sounds really miserable! Frown

Not in bed, sick at home.
I'm suffering from a burn-out and have been on sick leave since the 13th of March 2017.
As said, I am slowly recovering and if all goes well, I will start work again (2 days of 2 hours to start with) early November.
Yisc[NL]
S3 licensed
Rewrite is in full swing (well, I've had enough for today, but you'll get the point) and is going well.
Setting a default time, regular password and weather code is fully working again, including the data validation that was behind the old code.
Still have to do the default settings (and being able to copy them) for Wind, Qual, Start, Reset and Cruise and expect to have that finished before tomorrow evening.

There is one more thing I would like to add to this module, but I am not sure it will go in the final release of this version.
I feel that I am running out of steam (I've been sick at home for exactly 7 months now) and although I am slowly recovering, all this work is starting to take its toll.
So I might save the extra feature for the next release.
FGED GREDG RDFGDR GSFDG